package org.example.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.example.entity.PsychKnow;
import org.example.mapper.PsychKnowMapper;
import org.example.service.PsychKnowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName PsychKnowServiceImpl
 * @Description TODO
 * @Author lipeijin
 * @Date 2025年08月14日 下午4:41
 * @Version 1.0
 */
@Service
public class PsychKnowServiceImpl implements PsychKnowService {
    @Autowired
    private PsychKnowMapper psychKnowMapper;
    @Override
    public PageInfo<PsychKnow> getPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<PsychKnow> psychKnows = psychKnowMapper.getPage();
        PageInfo<PsychKnow> pageInfo = new PageInfo<>(psychKnows);
        return pageInfo;
    }
}
